package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.KpiPerformanceMonthlyMapper;
import com.ruoyi.system.domain.KpiPerformanceMonthly;
import com.ruoyi.system.service.IKpiPerformanceMonthlyService;

/**
 * 月度绩效管理Service业务层处理
 * 
 * @author wurb
 * @date 2024-01-23
 */
@Service
public class KpiPerformanceMonthlyServiceImpl implements IKpiPerformanceMonthlyService 
{
    @Autowired
    private KpiPerformanceMonthlyMapper kpiPerformanceMonthlyMapper;

    /**
     * 查询月度绩效管理
     * 
     * @param id 月度绩效管理主键
     * @return 月度绩效管理
     */
    @Override
    public KpiPerformanceMonthly selectKpiPerformanceMonthlyById(Long id)
    {
        return kpiPerformanceMonthlyMapper.selectKpiPerformanceMonthlyById(id);
    }

    /**
     * 查询月度绩效管理列表
     * 
     * @param kpiPerformanceMonthly 月度绩效管理
     * @return 月度绩效管理
     */
    @Override
    public List<KpiPerformanceMonthly> selectKpiPerformanceMonthlyList(KpiPerformanceMonthly kpiPerformanceMonthly)
    {
        return kpiPerformanceMonthlyMapper.selectKpiPerformanceMonthlyList(kpiPerformanceMonthly);
    }

    /**
     * 新增月度绩效管理
     * 
     * @param kpiPerformanceMonthly 月度绩效管理
     * @return 结果
     */
    @Override
    public int insertKpiPerformanceMonthly(KpiPerformanceMonthly kpiPerformanceMonthly)
    {
        kpiPerformanceMonthly.setCreateTime(DateUtils.getNowDate());
        return kpiPerformanceMonthlyMapper.insertKpiPerformanceMonthly(kpiPerformanceMonthly);
    }

    /**
     * 修改月度绩效管理
     * 
     * @param kpiPerformanceMonthly 月度绩效管理
     * @return 结果
     */
    @Override
    public int updateKpiPerformanceMonthly(KpiPerformanceMonthly kpiPerformanceMonthly)
    {
        return kpiPerformanceMonthlyMapper.updateKpiPerformanceMonthly(kpiPerformanceMonthly);
    }

    /**
     * 批量删除月度绩效管理
     * 
     * @param ids 需要删除的月度绩效管理主键
     * @return 结果
     */
    @Override
    public int deleteKpiPerformanceMonthlyByIds(Long[] ids)
    {
        return kpiPerformanceMonthlyMapper.deleteKpiPerformanceMonthlyByIds(ids);
    }

    /**
     * 删除月度绩效管理信息
     * 
     * @param id 月度绩效管理主键
     * @return 结果
     */
    @Override
    public int deleteKpiPerformanceMonthlyById(Long id)
    {
        return kpiPerformanceMonthlyMapper.deleteKpiPerformanceMonthlyById(id);
    }

    @Override
    public KpiPerformanceMonthly selectKpiPerformanceMonthlyByuserIdandDate(KpiPerformanceMonthly kpiPerformanceMonthly) {
        return kpiPerformanceMonthlyMapper.selectKpiPerformanceMonthlyByuserIdandDate(kpiPerformanceMonthly);
    }

    @Override
    public List<KpiPerformanceMonthly> selectSubmitDetails(KpiPerformanceMonthly kpiPerformanceMonthly) {
        return kpiPerformanceMonthlyMapper.selectSubmitDetails(kpiPerformanceMonthly);
    }
    @Override
    public List<KpiPerformanceMonthly> selectNoSubmitDetails(KpiPerformanceMonthly kpiPerformanceMonthly) {
        return kpiPerformanceMonthlyMapper.selectNoSubmitDetails(kpiPerformanceMonthly);
    }
}
